package com.company.arrays;

public class ArrayPrinter {
    public static void print(int[] arrs){
        StringBuilder stringBuilder=new StringBuilder();
        stringBuilder.append("{");

        for (int i = 0; i < arrs.length; i++) {
            stringBuilder.append(arrs[i]);
            if (i!=arrs.length-1) {
                stringBuilder.append(",");
            }
        }

        stringBuilder.append("}");
        System.out.println(stringBuilder.toString());
    }


    public static void print(int[][] matrix){
        System.out.println("{");
        for (int i = 0; i < matrix.length; i++) {
            System.out.printf("  ");;
            print(matrix[i]);
        }
        System.out.println("}\n");
    }
}
